<?php

my_component_load('riwayat_pelatihan');
$task = isset($_GET['task']) ? $_GET['task'] : "";
$kid = isset($_GET['kid']) ? $_GET['kid'] : 0 ;
$id = isset($_GET['id']) ? $_GET['id'] : 0 ;

if($task == 'edit_popup'){	
	$_SESSION['tab_page'] = '#tab4';
	$title= ($id > '0' ) ?  "Perubahan data hubungan keluarga" : "Tambah data hubungan keluarga";
	facebox_page('index.php?com='.$_GET['com'].'&task=edit_page&kid='.$kid.'&id='.$id  , $title , 200	); 
		
}elseif($task == "edit_page"){
	if($_SERVER['REQUEST_METHOD'] == "POST" ){
		form_riwayat_pelatihan_submit($kid,$id);
		generate_my_web("Update", false ,'plain.php' );exit;
	}
	$pagename = 'Test';
	$content = form_riwayat_pelatihan( $kid,$id );
	generate_my_web($content, false ,'plain.php' );
}